Nogweii

Turning off WiFi in Arch Linux

I have a couple of “servers” that have multiple interfaces,
one of which is a WiFi chip.

These servers are hard-wired in, via a Cat6 RJ45 cable. No WiFi needed, or used.

But, by default, when I run archinstall and “Copy the ISO network configuration”,
a /etc/systemd/network/20-wlan.network file is included. As since that file
matches a device (it globs any netdev that is named “wl*”)
systemd-wait-for-online will recognize it as in progress of configuration, and
wait. And wait. And wait.

I don’t like that, so I want to disable the device at boot and not include it
when deciding if the machine is online or not.

Pretty straightforward, actually:

Ignoring this device for “am I online?” check

systemd-wait-for-online.service will wait for any network devices the
network device manager has said it is busy configuring. systemd-networkd
allows you to tell it to not consider a device as required by setting the
property “RequiredForOnline” to ‘no’ under the [Link] section.

Turn off the network device at boot

I also want the wifi chip turned off when I boot up (ONLY WIRED!). Thankfully,
systemd-networkd supports that through another flag, “ActivationPolicy”. Setting
that to “down” means that as systemd-networkd does it’s first configuration
pass, it will turn off the device, but it won’t persistently keep turning it
off.

Putting that together

So what that means is my /etc/systemd/network/20-wlan.network file looks like
this:

[Match]
Name=wl*

[Link]
RequiredForOnline=no
ActivationPolicy=down

And now it’s configured as I want it!

References